/**
* @Title: warning_ctrl.js
* @Description: TODO
* Copyright: Copyright (c) 2014 
 * Company:中国平安
*
* @Project HIMS-FWA
* @date 2014年10月27日 下午4:43:38
* @version V1.0
*/
;
(function(){
	'use strict';
	
	var app = angular.module('fwa.mainApp');
	app.controller('CaseAuditReportDialogCtrl', ['$scope','CaseCommonService','$http','$modal','BaseURL','Modal','$modalInstance','FwaTabsetService','CommunityService','$stateParams','$state',
	                                function($scope,CaseCommonService,$http,$modal,baseUrl,Modal,$modalInstance,fwaTabsetService,CommunityService,$stateParams,$state){
       

		/**
		 * 下载稽核报告pdf
		 */
	
		//打开文件
	     $scope.openpdf = function (){
	    	  var caseCode=$scope.caseCode; 
	    	  console.log(caseCode);
	   			var success = new PDFObject({ url:baseUrl+'auditDownFileController/downReportNoticPdfFile.do?caseCode='+caseCode,
	   				pdfOpenParams: { navpanes: 1,
	                 toolbar: 1,
	                 statusbar: 1,
	                 view: 'FitV',
	                 pagemode: 'thumbs'
	   			}}).embed("reportOpenpdf");
	   		  }
		
		
		//关闭弹窗
         $scope.onOk = function() {
             $modalInstance.dismiss();
         }
         
         $scope.$watch('$viewContentLoaded',function(){
     		$scope.openpdf(); 	
         });
	
	}]);
})();
